{include file="public/header" /}

<ul class="nav nav-tabs">
  <li role="presentation" {if empty($Think.get.statistics)}class="active"{/if}><a href="{$record_url}">历史记录</a></li>
  <li role="presentation" {if $Think.get.statistics}class="active"{/if}><a href="{$statistics_url}">数据统计</a></li>
  <li role="presentation"><a href="{$detail_url}">返回上一页</a></li>
</ul>

{if empty($Think.get.statistics)}
<div class="mt20">
    <form>
        <input type="hidden" value="{$mobile}" name="mobile">
        <select class="form-control" name="view_type">
        <option value="all">全部</option>
            {volist name="view_type_arr" id="vo"}
            <option value="{$key}" {if $view_type eq $key} selected {/if}>{$vo}</option>
            {/volist}
        </select>
    </form>
    <div class="table-responsive">
      <table class="table">
        	<tr>
        		<th>序号</th>
        		<th>帐号</th>
        		<th>类型</th>
        		<th>内容</th>
        		<th>时间</th>
        	</tr>

        	{volist name="list" id="vo" empty="暂时没有数据"}
    		<tr {if $key%2 == 0}class="success"{/if}>
        		<td>{$key+1}</td>
        		<td>{$vo.mobile}</td>
        		<td>{$vo.recharge_type}</td>
        		<td>{$vo.message}</td>
        		<td>{$vo.create_time}</td>
        	</tr>
    		{/volist}
      </table>
    </div>
</div>
{else}
    {volist name="list" id="vo" empty="暂时没有数据"}
      <div class="form-group mt20">
        <label class="sr-only" for="exampleInputAmount">Amount (in dollars)</label>
        <div class="input-group">
          <div class="input-group-addon">{$vo["recharge_type"]}</div>
          <input type="text" class="form-control" id="exampleInputAmount" readonly value="{$vo['money']}">
          <div class="input-group-addon">元</div>
        </div>
      </div>
    {/volist}
{/if}
<button type="button" onclick="javascript:history.back(-1);" class="btn btn-default btn-lg btn-block mt30">返回上一页</button>
{include file="public/footer" /}


{literal}
<script type="text/javascript">
    $('select').change(function() {
        $(this).parent().submit();
    });
</script>
{/literal}